Skip to content

Conversation

@barnabasdomozi
Copy link
Collaborator

Closes: #674

  • Fixed a bug in Efferent Coupling Type level calculation: by default, ODB uses left join, which resulted in incorrect results
  • Added CppTypeDependencyMetrics table listing dependencies between individual types
  • Extended Efferent Coupling Type level calculation to insert these dependency relations
  • Implemented Efferent Coupling Module level calculation using this new table
  • Added test cases

@mcserep mcserep self-requested a review May 5, 2025 08:27
@mcserep mcserep added Kind: Enhancement 🌟 Kind: Important 🥇 Plugin: C++ Issues related to the parsing and presentation of C++ projects. Plugin: Metrics Issues related to the code metrics plugin. labels May 5, 2025
@mcserep mcserep added this to the Upcoming Release milestone May 5, 2025
@mcserep mcserep added this to Roadmap and Lab May 5, 2025
@github-project-automation github-project-automation bot moved this to In progress in Roadmap May 5, 2025
@github-project-automation github-project-automation bot moved this to In progress in Lab May 5, 2025
@mcserep mcserep requested a review from Copilot May 5, 2025 08:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the efferent coupling type level calculation while introducing new metrics for type dependencies and module-level efferent coupling. Key changes include:

  • Fixing the bug caused by the use of a left join in efferent coupling type level calculation.
  • Adding the CppTypeDependencyMetrics table and updating the efferent type level calculation to record dependency relations.
  • Implementing efferent coupling module level calculations and associated test cases.

Reviewed Changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
util/include/util/dbutil.h Refactored getFilterPathsQuery to use an if constexpr lambda for determining the query column.
plugins/cpp_metrics/test/src/cppmetricsparsertest.cpp Updated test parameter typedefs and instantiations for consistency.
plugins/cpp_metrics/parser/src/cppmetricsparser.cpp Updated inheritance query logic and added module level metric calculations.
plugins/cpp_metrics/parser/include/cppmetricsparser/cppmetricsparser.h Added declarations for new module coupling methods and constants.
Various files in plugins/cpp_metrics/test/sources/parser/* and plugins/cpp_metrics/model/include/model/* Added new module metric sources and updated model definitions to support efferent module metrics.
plugins/cpp/model/include/model/cppfunction.h Updated db view syntax for parameter and local variable views using the new inner alias.
Files not reviewed (3)
  • plugins/cpp_metrics/model/CMakeLists.txt: Language not supported
  • plugins/cpp_metrics/test/sources/parser/CMakeLists.txt: Language not supported
  • util/CMakeLists.txt: Language not supported

Copy link
Collaborator

@mcserep mcserep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@mcserep mcserep merged commit 20a9bd2 into Ericsson:master May 5, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Roadmap May 5, 2025
@github-project-automation github-project-automation bot moved this from In progress to Done in Lab May 5, 2025
@mcserep mcserep removed this from Roadmap May 5, 2025
@mcserep mcserep removed this from Lab May 5, 2025
@barnabasdomozi barnabasdomozi deleted the efferent_coupling_modules branch July 30, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Kind: Enhancement 🌟 Kind: Important 🥇 Plugin: C++ Issues related to the parsing and presentation of C++ projects. Plugin: Metrics Issues related to the code metrics plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Efferent Coupling at Module Level for C++

2 participants